package com.hnkywl.sts.entity.xtgl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.sys.Yg;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-5-8
 * Time: 下午3:34
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name="T_SYS_DLRZ")
@Where(clause = "deleted!='1'")
public class Dlrz extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqDlrz", allocationSize = 1, sequenceName = "SEQ_SYS_DLRZ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqDlrz")
    private Long id;

    /**
     * 登录人
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="DLR_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Yg dlr;

    /**
     * 登录日期
     */
    private Date dlrq;

    /**
     * 登录IP
     */
    private String dlip;

    /**
     * 登录MAC地址
     */
    private String dlmac;

    /**
     * 登录状态 1-登录    2-登出
     */
    private Integer zt;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Yg getDlr() {
        return dlr;
    }

    public void setDlr(Yg dlr) {
        this.dlr = dlr;
    }

    public Date getDlrq() {
        return dlrq;
    }

    public void setDlrq(Date dlrq) {
        this.dlrq = dlrq;
    }

    public String getDlip() {
        return dlip;
    }

    public void setDlip(String dlip) {
        this.dlip = dlip;
    }

    public String getDlmac() {
        return dlmac;
    }

    public void setDlmac(String dlmac) {
        this.dlmac = dlmac;
    }

    public Integer getZt() {
        return zt;
    }

    public void setZt(Integer zt) {
        this.zt = zt;
    }
}
